package cn.edu.nuaa.aadl2.generatorC.template

import java.util.Map
import java.util.HashMap

class Template {
	public static String abolutePathOfSystem = null;
	public static String aimPath=null;
	public static String systemheadfile = null;
	public static String systemfolder = null;
	public static String meta_systemheadfile = null;
	public static String meta_systemfolder = null;
	public static String CFolder=null;
	public static boolean isMeta = true;
	public static boolean dealPackage = true;
	public static Map<String,String> connections=new HashMap<String,String>();
	public static Map<String,Object> elementTypeMap=new HashMap<String,Object>;
	/**
	 * 顶层系统包名
	 */
	public static String packageName = null;
	/**
	 * 功能函数包名
	 */
	public static String subprogramsFileName = null;
	public static String typesFileName = null;

	public static String head = '''
		#include "taskLib.h"
		#include "DataType.h"
	'''

	public static String bakhead = '''
		#include "taskLib.h"
	'''

	public static String dhead = '''
		typedef char* string;
		#include "DataType.h"
	'''

	public static String bakdhead = '''
		#include "taskLib.h"
		#include "DataType.h"
		typedef char* string;
	'''
	public static String datatype = '''
		#include "DataType.h"
	'''
	static def initMap(){
//		connections=new HashMap<String,String>();
//		elementTypeMap=new HashMap<String,Object>;
		
	}
	static def init() {
		systemheadfile = null;
		systemfolder = null;
		meta_systemheadfile = null;
		meta_systemfolder = null;
		isMeta = true;
		dealPackage = true;
		packageName = null;
		subprogramsFileName = null;
		typesFileName = null;
		connections.clear;
		elementTypeMap.clear;
		abolutePathOfSystem=null;
		aimPath=null;
	}

}
